shrimp7.error = shrimp7.fn.error = {
	errors:{},
	errorMsg:function(code,msg,nextAction){
		if(this.errors[code]===UNDEFINED||this.errors[code]===""){
			if(!$("#error").is(':visible')){
				$("#errorBox").html('<span id="error"><a href="javascript:shrimp7.toggleScreen({id:\'errors\',title:\'Errors\',init:\'shrimp7.error.starter\'})"><img id="errorImg"src="images/icons/error.png"alt="error"/></a></span>');
			}
			
			this.errors.count = this.errors.count+1;
			this.errors[code] = {
				'msg': msg,
				'nextAction': nextAction
			};
		}
	},
	cleanError:function(code){
		if(this.errors.count>0&&this.errors[code]!==UNDEFINED){
			delete this.errors[code];
			this.errors.count = this.errors.count-1;
		}
		if(this.errors.count===0){
			$("#error").remove();
		}
	}
}

